package com.wyh.service.serviceImpl.gfiveImpl.tree_service_impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wyh.domain.vo.gfive.treeVo.LayerVO;
import com.wyh.mapper.gfivemapper.tree_mapper.LayerVOMapper;
import com.wyh.service.gfive.tree_service.ILayerVOService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LayerVOServiceImpl extends ServiceImpl<LayerVOMapper, LayerVO>
implements ILayerVOService {
    @Autowired
    private LayerVOMapper mapper;
    @Override
    public List<LayerVO> findAll() {
        return mapper.selectAll();
    }

    @Override
    public List<LayerVO> findList(Integer id) {
        QueryWrapper<LayerVO> wrapper = new QueryWrapper<>();
        wrapper.eq("parentid",id);
        List<LayerVO> layerVOList = mapper.selectList(wrapper);
        return layerVOList;
    }
}
